package com.cwh.springbootMybatis.service.task;

import com.cwh.springbootMybatis.service.OAService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @ClassName DoAuditTask
 * @Description TODO
 * @Author zhengchenggong
 * @Date 2020/4/30 6:00 下午
 * @Version 1.0
 **/

@Component
@EnableScheduling
@Lazy(false)
public class DoAuditTask {

    @Autowired
    OAService oaService;

    /**
     * @param
     * @description: 定时任务轮询报送审批结果给财社
     * @return:
     */
    @Scheduled(cron = "10 * * * * ?")
    public void sendToShebao(){
        oaService.doAudit();
    }
}
